package com.ruijie.acl.type;
/**
 * <p>
 * Title: 用于专家规则协议字段的枚举
 * </p>
 * <p>
 * Description: 用于专家规则协议字段的枚举
 * </p>
 * <p>
 * Copyright: Copyright (c) 2009
 * </p>
 * <p>
 * Company: Ruijie Co., Ltd.
 * </p>
 * <p>
 * Create Time: 2009-07-15
 * </p>
 * <p>
 * Update Time:
 * </p>
 * <p>
 * Updater:
 * </p>
 * <p>
 * Update Comments:
 * </p>
 * 
 * @author ASAI
 */
public enum EthernetProtocolTypeEnum {
	/**
	 * IPX Match ethernet type IPX
aarp Match ethernet type aarp
amber Match ethernet type amber
appletalk Match ethernet type appletalk
arp Match ethernet type arp
decnet-iv Match ethernet type decnet_iv
diagnostic Match ethernet type diagnostic
eapol Match ethernet type eapol
eigrp Enhanced Interior Gateway Routing Protocol
etype-6000 Match ethernet type etype 0x6000
etype-8042 Match ethernet type etype 0x8042
etype-any Match any ethernet type
gre General Routing Encapsulation
icmp Internet Control Message Protocol
igmp Internet Group Managment Protocol
ip Any Internet Protocol
ipinip IP In IP
lat Match ethernet type lat
lavc-sca Match ethernet type lavc-sca
mop-console Match ethernet type mop-console
mop-dump Match ethernet type mop-dump
mumps Match ethernet type mumps
netbios Match ethernet type netbios
nos NOS
ospf Open Shortest Path First
tcp Transmission Control Protocol
udp User Datagram Protocol
vines-echo Match ethernet type vines-echo
x.25 Match ethernet type x.25
xns-idp Match ethernet type xns-idp
	 */
	IPX("IPX"),
	aarp("aarp"),
	amber("amber"),
	appletalk("appletalk"),
	arp("arp"),
	decnet_iv("decnet-iv"),
	diagnostic("diagnostic"),
	eapol("eapol"),
	eigrp("eigrp"),
	etype_6000("etype-6000"),
	etype_8042("etype-8042"),
	etype_any("etype-any"),
	gre("gre"),
	icmp("icmp"),
	igmp("igmp"),
	ip("ip"),
	ipinip("ipinip"),
	lat("lat"),
	lavc_sca("lavc-sca"),
	mop_console("mop-console"),
	mop_dump("mop-dump"),
	mumps("mumps"),
	netbios("netbios"),
	nos("nos"),
	ospf("ospf"),
	tcp("tcp"),
	udp("udp"),
	vines_echo("vines-echo"),
	x25("x.25"),
	xns_idp("xns-idp");
	
	private String value;
	
	EthernetProtocolTypeEnum(String value){
		this.value=value;
	}
	public String value()
	{
		return this.value;
	}
	
	public static EthernetProtocolTypeEnum getEnum(String value){
		if(value==null||value.length()==0)return null;
		for(EthernetProtocolTypeEnum e:EthernetProtocolTypeEnum.values()){
			if(e.value.equals(value)){
				return e;
			}
		}
		return null;
	}
	
	public static void main(String[] agrs){
		boolean include=true;
		for(ProtocolTypeEnum pe:ProtocolTypeEnum.values()){
			try{
				EthernetProtocolTypeEnum.valueOf(pe.toString());
			}catch(Exception e){
				include=false;
				break;
			}
		}
		System.out.println("ProtocolTypeEnum inside EthernetProtocolTypeEnum?"+include);
		for(EthernetTypeEnum pe:EthernetTypeEnum.values()){
			try{
				EthernetProtocolTypeEnum.valueOf(pe.toString());
			}catch(Exception e){
				System.out.println(pe.toString());
				include=false;
			}
		}
		System.out.println("EthernetTypeEnum inside EthernetProtocolTypeEnum?"+include);
	}
}









